package top.xzxsrq.fileviewutils.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import top.xzxsrq.fileviewutils.service.LrcService;
import top.xzxsrq.web.utils.AjaxResult;

import java.util.List;

/**
 * 全部是本地任务，所以就开一个单线程的线程池承载任务。
 */
@RestController
@RequestMapping("/lrc")
public class LrcController {
    @Autowired
    private LrcService lrcService;

    @PostMapping("run")
    public AjaxResult run(@RequestBody List<String> paths) {
        return lrcService.run(paths);
    }
}
